﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Jogo_Grupo2.Cenas
{
    public static class GerenciadorDeCenas
    {
        public static CenaBase cenaatual;

        public static void setarcena(CenaBase proximacena)
        {
            if (cenaatual != null)
                cenaatual.terminate();

            cenaatual = proximacena;

            if (cenaatual != null)
                cenaatual.start();
        }
        public static bool update(GameTime gameTime)
        {
            if (cenaatual == null)
                return false;
            else
                cenaatual.update(gameTime);
            return true;

        }
        public static bool draw(SpriteBatch spriteBatch)
        {
            if (cenaatual == null)
                return false;
            else
                cenaatual.draw(spriteBatch);
            return true;
        }
    }
}
